1. Field of the Invention
This invention relates to a decoding device for signals transmitted in blocks and, more particularly, to such device for decoding digital signals such as PCM signals, that are transmitted in consecutive blocks each consisting of a predetermined number of words.
2. Description of the Prior Art
In recent years, it has become customary to make a sampling of analog audio or video signals, followed by quantization and encoding, and to transmit or otherwise record and/or reproduce the resulting signals in what is called pulse code modulcation (PCM) signals.
In transmitting or recording and/or reproducing these PCM signals, the practice commonly adopted for obtaining a bandwidth of, for example, 20 kHz and an S/N ratio of higher than about 90 dB, is to use a sampling frequency f.sub.s of 44.1 kHz and the linear quantization of 16 bits per word. However, the transmission rate in this instance reaches an extremely high value of 700 kbits per second (KBPS) or even higher.
In case of the digital signals obtained by A/D conversion of analog signals, such as the aforementioned audio and video signals, it is possible to compress the volume of the information, since these signals are naturally subject to deviation in their statistical properties and certain signal portions are less critical in view of their visual and aural effects. For example, it has been known that differential or summation processing or companding results in only limited deterioration in the quality of the transmitted or recorded signals.
With this in view, it has been proposed by the present Applicant in the copending Japanese Laid-open Patent Pulbications No. 223032/1984, 223033/1984, 223034/1984, 54537/1985, 103746/1985 and 58732/1985, and Japanese Applications Nos. 278501/1984 and 278504-278506/1984, that the digital PCM signals, for example, are formed in blocks after each predetermined number of words, and the signals are subjected block unit or blockwise to a predicting processing such as difference processing or companding before transmission or recording and/or reproduction.
In these techniques, the prediction filter processing mode, or the bit compression ratio or range, is switched blockwise before transmission or recording on the recording medium. At the receiving or reproducing side, the decoding processing is carried out blockwise in accordance with the mode or range at the transmitting or recording side for restoring the original input signals.
An example of the audio bit reduction system employing these techniques is now explained by referring to FIG. 1.
The system of FIG. 1 is made up of a transmitting or recording side encoder 10 and a receiving or reproducing side decoder 30. To an input terminal 11 of the encoder 10 are supplied PCM signals x(n) obtained by sampling analog audio signals by a frequency fs, followed by quantizing and encoding. These input signals x(n) are supplied to a prediction unit 12 and an adder 13. The predicted signal x(n) from the prediction unit 12 is supplied as the subtractive signal to the adder 13. Thus, in the adder 13, the predicted signal x(n) is subtracted from the input signals x(n) to produce as the output a predicted error signal or, in the broad sense of the term, a difference output d(n), as shown by an equation EQU d(n)=x(n)-x(n) (1)
It will be noted that the prediction unit 12 computes predicted values x(n) a linear combination of the past p number of inputs x(n-p), x(n-p+1), . . . , x(n-1), such that ##EQU1## wherein .alpha..sub.k (k=1, 2, . . . , P) stands for a coefficient. Hense, the predicted error output or, in the broad sense of the term, the difference d(n), is given by ##EQU2##
In the present example, the data of the input digital signals are formed into blocks at prescribed time periods, that is after each prescribed number of workds of the input data, and a set of the coefficiencts .alpha..sub.k is selected in order to obtain optimum prediction filter characteristics for each block. Therefore, it may be attempted to provide a plurality of filters for obtaining a difference output or predicted error output inclusive of the adders and the prediction units of different properties and select the optimum one of these difference processing filters for each of the aforementioned blocks. The selection of the optimum filter is made in a prediction and range adaptive circuit 21 by comparing the maximum absolute values or peak values in each of the blocks of the outputs from the plural difference processing filters, or the maximum absolute values or peak values multiplied by a coefficient, with one another. More specifically, the difference processing filter that minimizes the maximum absolute value multiplied or not multiplied by the coefficient is selected as the optimum filter for the block. The optimum filter selection information at this time is outputted as the mode selection information from the prediction and range adaptive circuit 21 to the prediction unit 12.
The difference output d(n) as the predicted error is supplied through an adder 14 to bit compression means consisting of a shifter 15 with a gain G and a quantizer 16 so as to be subjected to a compressing or ranging processing wherein, for example, the exponent and mantissa parts in the floating point system correspond to the gain G and to the output from the quantizer 16, respectively. That is, the shifter 15 makes what is called range changing by arithmetically shifting the digital binary data by a bit number depending on the gain G, while the quantizer 16 makes a re-quantization consisting in taking out a prescribed number of bits of the bit-shifted data. Then, a noise shaping circuit 17 or noise shaper makes what is called an error feedback consisting of obtaining a difference between the output and the input of the quantizer 16, or what is called the quantization error, by the adder 18, sending this quantization error to the prediction unit 20 through a shifter 19 with a gain G.sup.-1 and feeding the predicted signal of the quantization error back to the adder 14 as the subtractive signal.
It will be noted that the prediction and range adaptive circuit 21 outputs a range information on the basis of the maximum absolute value in the block of the difference output from the filter of the selected mode and forwards this range information to the shifters 15 and 19 for determining the gain G and G.sup.-1 for each block. The characteristics of the prediction unit 20 are also determined by the aforementioned mode information supplied thereto from the prediction and range adaptive circuit 21.
Hence, the output d'(n) from the adder 14 is equal to the difference output d(n) less the predicted signal e(n) of the quantization error from the noise shaper 17, so that EQU d'(n)=d(n)-e(n) (4)
such that the output d"(n) from the shifter of the gain G is expressed as EQU d"(n)=G.multidot.d'(n) (5)
The output d(n) from the quantizer 16 is expressed as EQU d(n)=d"(n)+e(n) (6)
wherein e(n) stands for the quantization error produced in the quantization process. The quantization error e(n) is taken out at an adder 18 of the noise shaper 17. The output signal is then passed through a shifter 19 having a gain G.sup.31 1 and a prediction unit 20 adapted for taking a linear combination of the past r number of input signals. The predicted signal e(n) thus obtained through the prediction unit 20 is expressed as ##EQU3##
It will be seen that this equation (7) has the same form as the above equation (2). The prediction units 12 and 20 are finite inpulse rsponse (FIR) filters having system functions of ##EQU4## respectively.
From these equations (4) to (7), the output d(n) from the quantizer 16 is expressed as ##EQU5##
Substituting d(n) of the equation (9) by the equation (3), ##EQU6## this output d(n) being taken out as an output terminal 22. With the z-transform of x(n), e(n) and d(n) being X(z), E(z) and D(z), respectively, we obtain ##EQU7##
It will be noted that the range information from the prediction and range adaptive circuit 21 is taken at an output terminal 23, while the mode selection information is taken at an output terminal 24.
To an input terminal 31 of a receiving or reproducing side decoder 30 is supplied the signal d'(n) obtained from the output d(n) from the output terminal 22 of the encoder 10 after transmission or recording and reproduction. This input signal d'(n) is supplied to an adder 33 through a shifter 32 having a gain G.sup.-1. The output x'(n) from the adder 33 is passed through a prediction unit 34 and thereby turned into a predicted signal x'(n). This predicted signal x'(n) is supplied to the adder 33 so as to be summed to the output d"(n) of the shifter 32. This summed output is taken out at an output terminal 35 as a decoder output x'(n).
It will be noted that the above range information and the mode selection information that are outputted at output terminals 23, 24 of the encoder 10 are introduced at input terminals 36, 37 of the decoder 30, respectivelyl. The range information from the input terminal 36 is sent to the shifter 32 to determine the gain G-1, while the mode selection information from the input terminal 37 is sent to the prediction unit 34 to determine the prediction characteristics. These prediction characteristics of the prediction unit 34 are selected so as to be equal to those of the prediction unit 12.
In the above described decoder 30, the output d"(n) from the shifter 32 is expressed as EQU d"(n)=d'(n).multidot.G.sup.-1 ( 12)
while the output x'(n) from the adder 33 is expressed as EQU x'(n)=d"(n)+x'(n) (13)
Since the prediction unit 34 is selected to have the characteristics equal to those of the prediction unit 12, ##EQU8## so that, from the equations (12) and (13), ##EQU9##
Thus, with z-transform of x'(n) and d'(n) being X'(z) and D'(z), ##EQU10## so that ##EQU11##
When it is assumed that no error is caused in the transmission channel or the recording medium and hence D'(z)=D(z), we obtain, from the equations (11) and (12), ##EQU12##
It is seen from this equation (17) that the noise reducing effect of G.sup.-1 is obtained relative to the quantization error E(z). With the spectrum distribution of the noise at the decoder output being N(z), we obtain ##EQU13##
When the code error is produced in such a bit reduction system, error correction or error interpolation is performed at the side of the decoder 30. It will be noted that, after the data decoding such as the expansion or semi-momentary processing or predictive decoding processing by units of blocks, the word length is restored to that of the original input data, that is the pre-encoded input data, so that the operating word length for error interpolation becomes correspondingly larger. It is therefore desirable that the error interpolation be executed in advance of the aforementioned decoding processing by units of blocks.
As such error interpolation, it is known to use a mean value interpolation using a mean value of the data before and after the error data, a preceding-value interpolation or a succeeding-value interpolation using a data before or after the error data, respectively. It is customary to use the mean value interpolation.
However, when a mean value interpolation, for example, is applied to the signals having different encode processing modes from block to block, as stated above, inconveniences are caused since the data of the adjacent blocks with the different processing modes are used for interpolating the boundary portions of the blocks, that is, the leading data and the last data of the blocks.
That is, it is assumed that, as shown for example in FIG. 2, the first order differential PCM mode and the straight PCM mode are selected for the first block BL1 and the second block BL2 of the encoder input signals, respectively. The signals output from the encoder and supplied to the decoder through the transmission channel are shown in FIG. 2B wherein data in the first block BL1 are the first order differential PCM data and the data in the second block BL2 are the straight PCM data, so that discontinuities are caused at the boundary between the blocks. Hence, the mean value interpolation should not be adopted for the leading words or the last words of the blocks. This is apparent from the fact that, when a code error should be produced for example at the foremost word Wa of the second block BL2 which is the straight PCM data, it would be meaniningless to take a mean value of the data of the different categories, such as first order differential PCM data such as the last word Wb of the first block BL1 and the straight PCM data such as the second word Wc of the second block BL2, and the resulting mean value is approximately wholly unrelated with the error data word Wa.